<!--
 * @Description: userAttrs使用
 * @Author: Zhanghan
 * @Date: 2025-03-18 19:58:29
 * @LastEditTime: 2025-05-08 16:10:24
 * @LastEditors: ZhangHan
-->
<template>
  <div>
    <div class="mb-2">userAttrs使用</div>
    <div class="mb-2">{{ desc ?? "请选择日期" }}</div>
    <div class="w-20">
      <ProDatePicker @change="dateChange" :type="'year'" />
    </div>
    <MyDraggable :initial-position="{ x: 300, y: 300 }">
      <template #default>
        <div>拖拽</div>
        <div>拖拽</div>
        <div>拖拽</div>
      </template>
    </MyDraggable>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { ProDatePicker } from "@/components/ProComponents";
import { MyDraggable } from "@/components";

const desc = ref();

//日期改变
const dateChange = (val: any) => {
  console.log(val, "父组件日期改变");
};
</script>
